<?php // no direct access
defined('_JEXEC') or die('Restricted access');

jimport('mylibs.globalModel');
$globalModel = new globalModel();
?>
<script src="<?php echo $this->template_dir ;?>assets/jquery/validate/jquery.validate.js" type="text/javascript"></script>

<div id="main-container" class="full">
        <div class="inner clearfix">
        
            <div id="main-body">
                <div id="main-content">
                
                <div class="kontakt-page clearfix">
             	<div class="active-bar">KONTAKT OS</div>
             	<div class="left-contact">
             		<img src="<?php echo $this->template_dir ;?>img/mini-logo.png" alt=""/>
             		<?php                             
							 $intro = $globalModel->getArticle(119); 
                    		 echo $intro['introtext'];               
                    ?>
                </div>
             	<div class="right-contact">
             		<h3 class="titlepage">Kontakt Form</h3>
             		<form action="<?php echo $this->action ?>" method="post" name="kontaktForm" id="kontaktForm">
             			<fieldset>
<!--             				<label>Navn</label>-->
             				<input class="txt-contact" type="text" value="Navn" id="name" name="name" onblur="if(this.value=='') this.value='Navn';" onfocus="if(this.value=='Navn') this.value='';"/>
             				<div class="clr"></div>
<!--             				<label>Email</label>-->
             				<input class="txt-contact" type="text" id="email" value="Email" name="email" onblur="if(this.value=='') this.value='Email';" onfocus="if(this.value=='Email') this.value='';"/>
             				<div class="clr"></div>
<!--             				<label>Emne</label>-->
             				<input id="subject" name="subject" type="text" value="Emne" class="txt-contact" onblur="if(this.value=='') this.value='Emne';" onfocus="if(this.value=='Emne') this.value='';" /><br />
             				<div class="clr"></div>
<!--							<label>Besked...</label>-->
             				<textarea id="message" name="message" onblur="if(this.value=='') this.value='Besked...';" onfocus="if(this.value=='Besked...') this.value='';">Besked...</textarea>
             				<div class="clr space10"></div>							
							<input type="submit" value="" class="btn" style="background:url(<?php echo $this->template_dir?>img/btn_send.jpg); border:0px;width:83px;height:24px;"/>
                            <input type="reset" value="" class="btn" style="background:url(<?php echo $this->template_dir?>img/btn_cancle.jpg); border: 0px;width:94px;height:24px;"/>
             			</fieldset>
             			<input type="hidden" name="option" value="com_kontakt" />
						<input type="hidden" name="controller" value="" />
						<input type="hidden" name="task" id="task" value="submit" />
						<?php echo JHTML::_( 'form.token' ); ?>
             		</form>
             	</div>
             </div>
                    
                </div><!--main-content-->
                
            </div><!--main-body-->
            
        </div>    	        
</div>
         
<script language="javascript">
	jQuery(document).ready(function($) {
		//jQuery.updnWatermark.attachAll();
			
		jQuery("#kontaktForm").validate({
			errorPlacement: function(error, element) {			
			},
			invalidHandler: function(form, validator) {
			  var errors = validator.numberOfInvalids();
			  if (errors) {
				alert(validator['errorList'][0]['message']);
				validator['errorList'][0]['element'].focus();
			  } else {
			  }
			},

			rules: {
				name: "required",
				subject: "required",
				message: "required",
				email: {
					required: true,
					email: true
				}
			},
			messages: {
				name: "<?php echo JText::_( 'Indtast dit navn' ); ?>",
				subject: "<?php echo JText::_( 'Indtast emne' ); ?>",
				message: "<?php echo JText::_( 'Indtast besked' ); ?>",
				email: "<?php echo JText::_( 'Angiv en gyldig e-mail adresse' ); ?>"
			}
		});
	});
</script>
